class Access {
    Role role
    Employee emp
    String userName
    String password
    Area area
    Container container

    //static belongsTo = [Employee, Area, Container]

    static constraints = {

    }
    public Integer haveAccessToController(){
        return this.container.id
    }
    public Boolean hasAdminAuth(){
        return role.level == 1
    }
    public Boolean hasManagerAuth(){
        return role.level == 2
    }
    
    //String toString(){"${this.emp} : ${this.role}"}
    String toString(){"${this.role}"}
    
}
